import { createRouter, createWebHistory } from 'vue-router'
import NotesView from '../views/NotesView.vue'
import MomentsView from '../views/MomentsView.vue'
import MessagesView from '../views/MessagesView.vue'
import TogetherView from '../views/TogetherView.vue'
import VirtualAvatarView from '../views/VirtualAvatarView.vue'
import AIPetView from '../views/AIPetView.vue'
import RecordEditorView from '../views/RecordEditorView.vue'
import ChatView from '../views/ChatView.vue'
import PetChatView from '@/views/PetChatView.vue';

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/notes'
    },
    {
      path: '/notes',
      name: 'notes',
      component: NotesView
    },
    {
      path: '/moments',
      name: 'moments',
      component: MomentsView
    },
    {
      path: '/messages',
      name: 'messages',
      component: MessagesView
    },
    {
      path: '/together',
      name: 'together',
      component: TogetherView
    },
    {
      path: '/together/create',
      name: 'together-create',
      component: () => import('../views/TogetherCreateView.vue')
    },
    {
      path: '/together/detail/:id',
      name: 'together-detail',
      component: () => import('../views/TogetherDetailView.vue'),
      props: true
    },
    {
      path: '/together/feature/create',
      name: 'together-feature-create',
      component: () => import('../views/TogetherFeatureCreateView.vue')
    },
    {
      path: '/virtual-avatar',
      name: 'virtual-avatar',
      component: VirtualAvatarView
    },
    {
      path: '/ai-pet',
      name: 'ai-pet',
      component: AIPetView
    },
    {
      path: '/record-editor',
      name: 'record-editor',
      component: RecordEditorView
    },
    {
      path: '/chat/:username',
      name: 'chat',
      component: ChatView
    },
    {
      path: '/pet-chat',
      name: 'pet-chat',
      component: PetChatView,
    },
    {
      path: '/together/feature/weightloss',
      name: 'together-feature-weightloss',
      component: () => import('../views/TogetherFeatureWeightLossView.vue')
    },
    {
      path: '/together/feature/messageboard',
      name: 'together-feature-messageboard',
      component: () => import('../views/TogetherFeatureMessageBoardView.vue')
    },
  ]
})

export default router